<script type="text/javascript" src="themes/odotclassic/js/odotclassic.js" />  

<div id="maincontent">

<h1 style="margin-top: 75px;">Welcome To Ajuby Setup Wizard</h1>

 <div class="list">
    <h2>Step 2: Application configuration</h2>
    <h4>Please enter your application configurations here, if you are unsure we suggest that you use the default values</h4> 
 </div>
    <% for name in [:notice, :warning, :message] %>
    <% if flash[name] %>
      <%= "<div class='message-fatal'> #{flash[name]} </div>" %>
    <% end %>
  <% end %>


 <% if(@iserror) %>
     <input type="button" value="<<Back" onclick="javascript:history.go(-1);"/>
 <%else%>

<!-- ELSE BLOCK STARTS -->

 <% for name in [:simplemsg] %>
    <% if flash[name] %>
      <%= "<div class='message-justmsg'> #{flash[name]} </div>" %>
    <% end %>
  <% end %>

 <div class='bar1'>Application configuration</div>
    <div class="list">
       <%= start_form_tag :controller => 'checkinstall', :action => 'page4' %>
        <fieldset><legend>Enter Application Settings</legend>
            <table>
               <tr class="odd" >
                <td>
                    <font color="red">*</font> Ajuby admin user name  
                 </td>
                <td>
                    <%= text_field_tag "odotadminusername", "admin", "size" => 20 %>
                 </td>
               </tr>  
               <tr class="even" >
                <td>
                    <font color="red">*</font> Ajuby admin password
                 </td>
                <td>
                    <%= password_field_tag "odotadminpassword", "", "size" => 20 %>
                 </td>
                </tr>
    </table> 
    <span style="font-size: 9px; color:red;">* Required fields </span> <br><br>
    
  </fieldset>
   </div>


    <div class="list">
        <fieldset><legend>Enter Email Settings (optional)</legend>
            <table>
               <tr class="odd" >
                <td>
                    <input name="emailconfigtype" type="radio" value="sendmail" onclick="javascript:hideDiv('emailconfigfields');"/>   
                    My system supports sendmail <a href="http://en.wikipedia.org/wiki/Sendmail">(?)</a> 
                 </td>

               </tr>  
               <tr class="even" >
                <td>
                    <input name="emailconfigtype" type="radio" value="smtp" onclick="javascript:showDiv('emailconfigfields')"/> 
                    My system supports SMTP only
                 </td>
                </tr>
              </table> 
              <span style="font-size: 10px; color:gray;">Email settings are needed if you want emails to work properly, e.g. signup, forgot password etc.</span>
              <br>
              <br>
              
            <div class="list" id="emailconfigfields" style="display: none;">
                <fieldset><legend>SMTP Settings</legend>
                    <table>
                       <tr class="odd" >
                        <td>
                            <font color="red">*</font> SMTP Address
                         </td>
                         <td>
                            <%= text_field_tag "smtpaddress", "", "size" => 20 %>[ e.g. smtp.sbcglobal.yahoo.com]
                         </td>
                       <tr class="even" >
                        <td>
                            <font color="red">*</font> SMTP Doamin
                         </td>
                         <td>
                            <%= text_field_tag "smtphost", "", "size" => 20 %>[ If you do not know this specifically leave it same as SMTP Address. ]
                         </td>
                       <tr class="odd" >
                        <td>
                            <font color="red">*</font> SMTP User name
                         </td>
                         <td>
                            <%= text_field_tag "smtpusername", "", "size" => 20 %>
                         </td>
                       <tr class="even" >
                        <td>
                            <font color="red">*</font> SMTP Password
                         </td>
                         <td>
                            <%= password_field_tag "smtppassword", "", "size" => 20 %>
                         </td>
                         
                        </tr>
                      </table> 
                      <span style="font-size: 9px; color:red;">* Required fields </span> <br>
                      
                  </fieldset>
              </div>
          </fieldset>
      </div>
     <tr>
        <td>
           <input type="button" value="<<Back" onclick="javascript:history.go(-1);"/>&nbsp;&nbsp;
           <%= submit_tag (value = "Next>>") %>
        </td>
    </tr>
     <%= end_form_tag %>  
</div>

<%end%>


